//
//  SaveFamilyMemberApi.m
//  DTSTON
//
//  Created by 喻贵华 on 16/5/5.
//  Copyright © 2016年 Demo. All rights reserved.
//

#import "SaveFamilyMemberApi.h"

@implementation SaveFamilyMemberApi
{
    NSDictionary *_parameter;
}
-(id)initWithPar:(NSDictionary *)parameter
{
    self=[super init];
    if(self)
    {
        _parameter=parameter;
        
    }
    return self;
}
-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST;
}

-(NSString *)requestUrl
{
    return @"/family/save";
}
-(id)requestArgument
{
    
    NSMutableDictionary *mdic=[NSMutableDictionary getPubdic];
  
    if (_parameter[@"id"]) {
        [mdic setObject:_parameter[@"id"] forKey:@"id"];
    }else
    {
         [mdic setObject:@"0" forKey:@"id"];
    }
    if (_parameter[@"relationship"]) {
        [mdic setObject:_parameter[@"relationship"] forKey:@"relationship"];
    }
    if (_parameter[@"sex"]) {
        [mdic setObject:_parameter[@"sex"] forKey:@"sex"];
    }
    if (_parameter[@"age"]) {
        [mdic setObject:_parameter[@"age"] forKey:@"age"];
    }
    if (_parameter[@"weight"]) {
        [mdic setObject:_parameter[@"weight"] forKey:@"weight"];
    }
    if (_parameter[@"height"]) {
        [mdic setObject:_parameter[@"height"] forKey:@"height"];
    }
      NSString *sign= [NSString getSign:mdic];
    [mdic setObject:sign forKey:@"sign"];
    return mdic;
}
-(void)dealloc
{
   NSLog(@"%@ dealloc",NSStringFromClass([self class]));
}
@end
